package org.hospital.entity;
// default package

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hospital.util.DateUtil;


/**
 * Employee entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="employee"
    ,catalog="hospital"
)

public class Employee  implements java.io.Serializable {


    // Fields    
     private Integer employeeId;
     private Integer positionId;
     private Integer departmentId;
     private Integer clinicId;
     private String employeeCode;
     private String account;
     private String pwd;
     private String name;
     private Integer age = 0;
     private String sex = "null";
     private Timestamp registerTime;
     private Timestamp loginTime = new Timestamp(DateUtil.getDateLong("1000-01-01 00:00:00"));;
     private Timestamp birthdate = new Timestamp(DateUtil.getDateLong("1000-01-01 00:00:00"));;
     private String loginIp = "null";
     private Integer status;
     private Integer isOnJob;
     private Integer isDomain;


    // Constructors

    /** default constructor */
    public Employee() {
    }

	/** minimal constructor */
    public Employee(Integer positionId, Integer departmentId, Integer clinicId, String employeeCode, String account, String pwd, String name, Timestamp registerTime, Integer status, Integer isOnJob, Integer isDomain) {
        this.positionId = positionId;
        this.departmentId = departmentId;
        this.clinicId = clinicId;
        this.employeeCode = employeeCode;
        this.account = account;
        this.pwd = pwd;
        this.name = name;
        this.registerTime = registerTime;
        this.status = status;
        this.isOnJob = isOnJob;
        this.isDomain = isDomain;
    }
    
    /** full constructor */
    public Employee(Integer positionId, Integer departmentId, Integer clinicId, String employeeCode, String account, String pwd, String name, Integer age, String sex, Timestamp registerTime, Timestamp loginTime,Timestamp birthdate, String loginIp, Integer status, Integer isOnJob, Integer isDomain) {
        this.positionId = positionId;
        this.departmentId = departmentId;
        this.clinicId = clinicId;
        this.employeeCode = employeeCode;
        this.account = account;
        this.pwd = pwd;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.registerTime = registerTime;
        this.loginTime = loginTime;
        this.birthdate = birthdate;
        this.loginIp = loginIp;
        this.status = status;
        this.isOnJob = isOnJob;
        this.isDomain = isDomain;
    }

   
    // Property accessors
    @Id @GeneratedValue
    @Column(name="employeeId", unique=true, nullable=false)
    public Integer getEmployeeId() {
        return this.employeeId;
    }
    
    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }
    
    @Column(name="positionId", nullable=false)
    public Integer getPositionId() {
        return this.positionId;
    }
    
    public void setPositionId(Integer positionId) {
        this.positionId = positionId;
    }
    
    @Column(name="departmentId", nullable=false)
    public Integer getDepartmentId() {
        return this.departmentId;
    }
    
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }
    
    @Column(name="clinicId", nullable=false)
    public Integer getClinicId() {
        return this.clinicId;
    }
    
    public void setClinicId(Integer clinicId) {
        this.clinicId = clinicId;
    }
    
    @Column(name="employeeCode", nullable=false, length=50)
    public String getEmployeeCode() {
        return this.employeeCode;
    }
    
    public void setEmployeeCode(String employeeCode) {
        this.employeeCode = employeeCode;
    }
    
    @Column(name="account", nullable=false, length=50)
    public String getAccount() {
        return this.account;
    }
    
    public void setAccount(String account) {
        this.account = account;
    }
    
    @Column(name="pwd", nullable=false, length=50)
    public String getPwd() {
        return this.pwd;
    }
    
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }
    
    @Column(name="name", nullable=false, length=50)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="age")
    public Integer getAge() {
        return this.age;
    }
    
    public void setAge(Integer age) {
        this.age = age;
    }
    
    @Column(name="sex", length=5)
    public String getSex() {
        return this.sex;
    }
    
    public void setSex(String sex) {
        this.sex = sex;
    }
    
    @Column(name="registerTime", nullable=false, length=19)
    public Timestamp getRegisterTime() {
        return this.registerTime;
    }
    
    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }
    
    @Column(name="loginTime", length=19)
    public Timestamp getLoginTime() {
        return this.loginTime;
    }
    
    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }
    
    @Column(name="birthdate", length=19)
    public Timestamp getBirthdate() {
		return this.birthdate;
	}

	public void setBirthdate(Timestamp birthdate) {
		this.birthdate = birthdate;
	}

	@Column(name="loginIp", length=50)
    public String getLoginIp() {
        return this.loginIp;
    }
    
    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }
    
    @Column(name="status", nullable=false)
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    
    @Column(name="isOnJob", nullable=false)
    public Integer getIsOnJob() {
        return this.isOnJob;
    }
    
    public void setIsOnJob(Integer isOnJob) {
        this.isOnJob = isOnJob;
    }
    
    @Column(name="isDomain", nullable=false)
    public Integer getIsDomain() {
        return this.isDomain;
    }
    
    public void setIsDomain(Integer isDomain) {
        this.isDomain = isDomain;
    }
   





}